<?php
$tranlators = array();
foreach(new system_setting_translator() AS $traslator) {
	$tranlators[strtolower($traslator->getKey())] = $traslator->getLanguage();
}
if(!empty($tranlators)) {
	$this->headScript()->appendFile(_STATIC_HTTP . '/admin/js/translator.js?url=' . ((string) $this->url('index/ajax/translate')) . '&lang=' . json_encode($tranlators));
}
?>
<fieldset style="padding:1px 0;margin:0 5px;">
	<legend style="margin:0 5px;">&nbsp;&nbsp;<strong><?php echo $this->language('TRANSLATE IN BATCHES');?></strong>&nbsp;&nbsp;</legend>
	<ul class="citem" style="margin:3px 12px 8px 0;">
		<li><select id="translator-api" onchange="translator.select();"><option value="">== SELECT ==</option><?php 
		foreach(new system_setting_translator() AS $traslator) {
			echo '<option value="' . strtolower($traslator->getKey()) . '">[' . $traslator->getInterface() . ']' . $traslator->getName() . '</option>';
		}
		?></select></li>
		<li><?php echo $this->language('From');?>:</li>
		<li><select id="translator-from"><option value="">== SELECT ==</option></select></li>
		<li><?php echo $this->language('To');?></li>
		<li><select id="translator-to"><option value="">== SELECT ==</option></select></li>
		<li><hr/></li>
		<li><button type="button" name="translate" onclick="translator.start();"><?php echo $this->language('Translate');?> »</button></li>
	</ul>
</fieldset>
